﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LinQ_DTO;
using DAO;

namespace BUS
{
    public class UserBUS
    {

        public List<aspnet_User> LayDanhSach()
        {
            UserDAO udao = new UserDAO();
            return udao.LayDanhSach();
        }

        public aspnet_User LayUserTheoId(Guid ma)
        {
            UserDAO udao = new UserDAO();
            return udao.LayUserTheoId(ma);

        }

        public void Them(aspnet_User user)
        {
            UserDAO udao = new UserDAO();
            udao.Them(user);

        }

        public void Xoa(Guid ma)
        {

            UserDAO udao = new UserDAO();
            udao.Xoa(ma);

        }

        public void CapNhat(aspnet_User user)
        {

            UserDAO udao = new UserDAO();
            udao.CapNhat(user);

        }


/// //////////////////////////////////////CODE BY NMCUONG////////////////////////

        
        public aspnet_User LayUserTheoTen(string UserName)
        {
            UserDAO Dao = new UserDAO();
            return Dao.LayUserTheoTen(UserName);
        }

        public aspnet_User LayUserTheoMa(Guid UserId)
        {
            UserDAO Dao = new UserDAO();
            return Dao.LayUserTheoMa(UserId);
        }

        /************************************************************************************************************        *                          coder: TRAN KINH LY 
         ***********************************************************************************************************/
        public List<aspnet_User> TimUserTheo_Khoa_LoweredRoleName(String key_search, String lrn)
        {
            UserDAO Dao = new UserDAO();
            return Dao.TimUserTheo_Khoa_LoweredRoleName(key_search, lrn);
        }

        /************************************************************************************************************        *                          coder: TRAN KINH LY 
         ***********************************************************************************************************/


    }
}
